package com.lemon.support.exception;


import com.lemon.support.base.TopEnum;

/**
 * @program: lemonnote
 * @description: 异常信息枚举，SYS-系统异常报出，BIZ-业务异常报出，
 *                  尽量放置通用性业务错误,请不要格式化该文件
 * @author: Lemontree
 * @create: 2018-05-18 22:32
 **/
public enum ExceptionResCode implements TopEnum {
    SYS_UNEXPECTED_ERROR(1500, "服务器异常~"),
    SYS_ARG_ERROR(1400,"参数错误"),
    SYS_DATA_ERROR(1300,"数据异常"),
    BIZ_SERVER_ERROR(2500, "服务器开了个小差，请稍后重试~");

    private int code;
    private String message;

    ExceptionResCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
